package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.operamask.OperaMaskSceneRank;
import com.yanqu.road.entity.activity.operamask.OperaMaskUserData;
import com.yanqu.road.entity.activity.operamask.config.OperaMaskSceneConfig;
import com.yanqu.road.entity.activity.operamask.config.OperaMaskSkillConfig;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class OperaMaskBusiness {

    // 配置

    public static Map<Integer, OperaMaskSceneConfig> getOperaMaskSceneConfigMap(int activityId) {
        return DaoHelper.getOperaMaskSceneConfigDaoImpl().getOperaMaskSceneConfigMap(activityId);
    }

    public static Map<Integer, List<OperaMaskSkillConfig>> getOperaMaskSkillConfigMap(int activityId) {
        return DaoHelper.getOperaMaskSkillConfigDaoImpl().getOperaMaskSkillConfigMap(activityId);
    }

    // 数据

    public static OperaMaskUserData getOperaMaskUserData(int activityId, long userId) {
        return DaoHelper.getOperaMaskUserDataDaoImpl().getOperaMaskUserData(activityId, userId);
    }

    public static boolean addOperaMaskUserData(OperaMaskUserData data) {
        return DaoHelper.getOperaMaskUserDataDaoImpl().add(data);
    }

    public static boolean updateOperaMaskUserData(OperaMaskUserData data) {
        return DaoHelper.getOperaMaskUserDataDaoImpl().update(data);
    }

    public static List<OperaMaskUserData> getOperaMaskUserDataList(int activityId) {
        return DaoHelper.getOperaMaskUserDataDaoImpl().getOperaMaskUserDataList(activityId);
    }

    // 榜单

    public static Map<Integer, Map<Integer, LinkedList<OperaMaskSceneRank>>> getOperaMaskSceneRankMap(int activityId) {
        return DaoHelper.getOperaMaskSceneRankDaoImpl().getOperaMaskSceneRankMap(activityId);
    }

    public static boolean replaceOperaMaskSceneRank(LinkedList<OperaMaskSceneRank> rankList) {
        return DaoHelper.getOperaMaskSceneRankDaoImpl().replaceData(rankList);
    }


}
